# Maintainer: Balló György <ballogyor+arch at gmail dot com>

pkgname=gumbo-parser
pkgver=0.12.1
pkgrel=1
pkgdesc="HTML5 parsing library in pure C99"
arch=(loong64 x86_64)
url="https://codeberg.org/grisha/gumbo-parser/"
license=(Apache)
depends=(glibc)
checkdepends=(gtest)
source=("$pkgname-$pkgver.tar.gz::https://codeberg.org/grisha/gumbo-parser/archive/$pkgver.tar.gz")
sha256sums=('c0bb5354e46539680724d638dbea07296b797229a7e965b13305c930ddc10d82')

prepare() {
  cd $pkgname
  ./autogen.sh
}

build() {
  cd $pkgname
  ./configure --prefix=/usr
  make
}

check() {
  cd $pkgname
  make -k check
}

package() {
  cd $pkgname
  make DESTDIR="$pkgdir" install
}
